<?php
namespace Xiaoc\Api;

use PhalApi\Api;

use Xiaoc\Model\Users as ModelTest;

/**
 * Xiaoc接口测试
 *
 * @author: zhy <zhy302813@163.com> 2017-8-19
 */

class Test extends Api {
    public function getRules() {
        return array(
            'say' => array(
                'title' => array('name' => 'title', 'require' => true, 'min' => 1, 'max' => '2', 'desc' => '测试标题'),
                'state' => array('name' => 'state', 'type' => 'int', 'default' => 0, 'desc' => '测试状态'),
            )
        );
    }
	/**
	 * CURD测试
	 * @desc Xiaoc命名空间下的测试接口
	 */
	public function say() {

		$model = new ModelTest();
		$row = $model->getListTotal(2);
		return $row;

	}
}
